package com.uplooking.service;

import com.uplooking.dao.DBUtil;
import org.apache.commons.dbutils.QueryRunner;

import javax.sql.DataSource;
import java.sql.SQLException;

public class DeleteArtical {
    public Integer getDeleteArtical(Integer id) throws SQLException {
        DataSource c3P0ConnctionPool = DBUtil.getC3P0ConnctionPool();
        QueryRunner queryRunner = new QueryRunner(c3P0ConnctionPool);
        int update = queryRunner.update("delete  from artical where id = "+id );
        return update;
    }
}
